<?php

/**
 * @Author: ddyake
 * @Date:   2020-12-21 01:41:42
 * @Last Modified by:   ddyake
 * @Last Modified time: 2020-12-22 15:44:12
 * 商品详细内容
 */
$json = array('status'=>'ok','msg'=>'ok','data'=>[]);

$params = $this->params();
$sys = $this->website['class']['unity']->configura('sys');


$json['data']['product']=$this->website['class']['db']
                        ->table('product')
                        ->where('id=? and sid=?',$params['id'],$params['sid'])
                        ->one();

if(!($json['data']['product']['id']??false)){
  $json['status'] = 'error';
  $this->json_encode_encrypt($json);
}


$json['data']['image']= $this->website['class']['db']
                        ->table('product_image')
                        ->where('pid=?',$params['id'])
                        ->select();
$json['data']['detail']= $this->website['class']['db']
                        ->table('product_detail')
                        ->where('pid=?',$params['id'])
                        ->order('id asc')
                        ->select();
















$this->json_encode_encrypt($json);